<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-language" content="en" />
<meta name="Keywords"
	content="progress,ant,compilation,automated,task,querret,apache,build tools,roundtable" />
<meta name="Description"
	content="PCT is set of ANT tasks designed to compile Progress procedures among others things" />
<meta name="revisit-after" content="30 days" />
<meta name="DC.Language" content="en" />
<title>PCT documentation - PCTCreateBase task</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"
	title="Normal" />
</head>
<body>

<div class="Main">

<div class="Bandeau"><span id="sflogo"> <a href="http://sourceforge.net"><img
	id="sflogoimg" alt="SourceForge.net Logo" height="31" width="88"
	src="http://sourceforge.net/sflogo.php?group_id=%3Cb%3E85743%3C/b%3E&amp;amp;type=1" /></a>
</span> Progress&reg; OpenEdge&reg; Compilation Tools</div>

<div class="Menu"><a href="index.html">Overview</a> :: <a
	href="download.html">Download</a> :: <a href="screenshots.html">Screenshots</a>
:: <span class="selected">Documentation</span> :: <a
	href="javadoc/index.html">JavaDoc</a> :: <a href="links.html">Links</a>
</div>

@RIGHT_BANNER@

<div class="Text">
<h1>PCTCreateBase task -- &lt;pct:db_create /&gt;</h1>

<h2>Description</h2>
<p>Creates Progress database.</p>

<h2>Parameters</h2>
<table class="params">
	<tr>
		<th>Attribute</th>
		<th>Description</th>
		<th>Type</th>
		<th>Requirement</th>
		<th>Default value</th>
	</tr>
	<tr>
		<td>DBName</td>
		<td>Database name</td>
		<td align="center">String</td>
		<td align="center">Required</td>
		<td>No default value</td>
	</tr>
	<tr>
		<td>DestDir</td>
		<td>Destination directory where to create the database</td>
		<td align="center">File</td>
		<td align="center">Optional</td>
		<td>Current directory</td>
	</tr>
	<tr>
		<td>schemaFile</td>
		<td>Initial dump file(s) to load into database. Separate dump filenames with commas. Files are resolved first
		    as an absolute path, then relative to base directory.</td>
		<td align="center">String</td>
		<td align="center">Optional</td>
		<td>No default value</td>
	</tr>
	<tr>
		<td>StructFile</td>
		<td>Structure description file</td>
		<td align="center">File</td>
		<td align="center">Optional</td>
		<td>No default value</td>
	</tr>
	<tr>
		<td>BlockSize</td>
		<td>Block size in kilobytes (1, 2, 4 or 8)</td>
		<td align="center">Integer</td>
		<td align="center">Optional</td>
		<td>8</td>
	</tr>
	<tr>
		<td>NoInit</td>
		<td>No initialization of database schema (procopy emptyX dbName)</td>
		<td align="center">Boolean</td>
		<td align="center">No</td>
		<td>False</td>
	</tr>
	<tr>
		<td>Overwrite</td>
		<td>Overwrites database if exists</td>
		<td align="center">Boolean</td>
		<td align="center">No</td>
		<td>False</td>
	</tr>
	<tr>
		<td>Codepage</td>
		<td>Copy empty database from a prolang subdirectory. So database use a
		specific codepage instead of the undefined codepage</td>
		<td align="center">String</td>
		<td align="center">No</td>
		<td>No default value (undefined)</td>
	</tr>
	<tr>
		<td>wordRules</td>
		<td>Assign a specific word rules table to a database (ie runs a proutil dbname -C word-rules XXX). This
        command is run before loading schema (if available). This command is not run if parameter not defined.</td>
		<td align="center">Integer</td>
		<td align="center">No</td>
		<td>No default value (undefined)</td>
	</tr>
</table>
<p>PCTCreateBase inherits attributes from <a href="PCT.html">PCT</a>.</p>

<h2>Parameters as nested elements</h2>
<h3>propath (org.apache.tools.types.Path)</h3>
<p>Creates a nested propath, and adds it to the implicit propath. The
propath is only used during schema update.</p>
<h3>OracleHolder (<a href="OracleHolder.html">com.phenix.pct.OracleHolder</a>)</h3>
<p>Creates a new Oracle schema holder inside a database. If a schema holder is defined,
no schema can be loaded in the main database.</p>
<h3>MSSHolder (<a href="MSSHolder.html">com.phenix.pct.MSSHolder</a>)</h3>
<p>Creates a new SQL Server schema holder inside a database. If a schema holder is defined,
no schema can be loaded in the main database.</p>
<h3>ODBCHolder (<a href="ODBCHolder.html">com.phenix.pct.ODBCHolder</a>)</h3>
<p>Creates a new ODBC schema holder inside a database. If a schema holder is defined,
no schema can be loaded in the main database.</p>

<h2>Examples</h2>
<pre>
&lt;PCTCreateBase dbName="MyDB" dlcHome="${env.DLC}"/&gt;
</pre>
<p>Creates an empty database named MyDB in current directory. Command
line used is <code>procopy empty8 MyDB</code></p>

<pre>
&lt;PCTCreateBase dbName="MyDB" destDir="MyDir" dlcHome="${env.DLC}" schemaFile="/home/test/MySchema.df,YourSchema.df" wordRules="1" /&gt;
</pre>
<p>Creates an empty database named MyDB in MyDir subdir of the current
directory, then load proword.1 word break table (<code>_proutil MyDB -C word-rules 1</code>),
and then loads schema from files /home/test/MySchema.df and YourSchema.df.
/home/testMySchema.df will be resolved as an absolute filename, and if it's not found,
PCT will search a file of the same name in the ${basedir} directory. Same thing will
happen with YourSchema.df</p>

<pre>
&lt;echo file="test.st"&gt;
  b test.b1 f 1024
  b test.b2 v 2048
  d "Schema Area":6,64 test.d1 f 1024
  d "Schema Area":6,64 test.d2 v 2048
&lt;/echo&gt;
&lt;PCTCreateBase dbName="test" dlcHome="${env.DLC}" structFile="test.st" codepage="utf"/&gt;
</pre>
<p>Creates a database structure from test.st file (<code>_proutil
prostrct create test test.st</code>) and then <code>procopy
$DLC/prolang/utf/empty8 test</code>.</p>

<pre>
&lt;PCTCreateBase dbName="test" dlcHome="${env.DLC}"&gt;
  &lt;OracleHolder dbName="ora1" oracleVersion="8" codepage="iso8859-1" collation="BASIC" schemaFile="oradump.df" /&gt;
&lt;/PCTCreateBase&gt;
</pre>
<p>Creates a new empty database, containing a schema holder for an <code>ora1</code>
oracle database, using a specific codepage and collation table, and loads oradump.df into database.
The .df file should be generated using prodict/ora/_gendsql.p program (prodict.pl package in $DLC), or
using the not-developed-yet DFConvert task</p>
</div>

</div>

@ANALYTICS@</body>
</html>
